<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: Assimp::IOStream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v3.0 (July 2012)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_assimp.html">Assimp</a></li><li class="navelem"><a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="class_assimp_1_1_i_o_stream.html#pub-methods">Public Member Functions</a> &#124;
<a href="class_assimp_1_1_i_o_stream.html#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Assimp::IOStream Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>CPP-API: Class to handle file I/O for C++.  
 <a href="class_assimp_1_1_i_o_stream.html#details">More...</a></p>

<p><a href="class_assimp_1_1_i_o_stream-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aaa01183d197fb714f28d6c611b6fa058"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#aaa01183d197fb714f28d6c611b6fa058">FileSize</a> () const =0</td></tr>
<tr class="memdesc:aaa01183d197fb714f28d6c611b6fa058"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns filesize Returns the filesize.  <a href="class_assimp_1_1_i_o_stream.html#aaa01183d197fb714f28d6c611b6fa058"></a><br/></td></tr>
<tr class="memitem:a7c19952446ece90924b246f087417899"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#a7c19952446ece90924b246f087417899">Flush</a> ()=0</td></tr>
<tr class="memdesc:a7c19952446ece90924b246f087417899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush the contents of the file buffer (for writers) See fflush() for more details.  <a href="class_assimp_1_1_i_o_stream.html#a7c19952446ece90924b246f087417899"></a><br/></td></tr>
<tr class="memitem:ae376f641020989d61863b9c6f55c7abf"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#ae376f641020989d61863b9c6f55c7abf">Read</a> (void *pvBuffer, size_t pSize, size_t pCount)=0</td></tr>
<tr class="memdesc:ae376f641020989d61863b9c6f55c7abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read from the file.  <a href="class_assimp_1_1_i_o_stream.html#ae376f641020989d61863b9c6f55c7abf"></a><br/></td></tr>
<tr class="memitem:a5ed0dddf418ab08cf3fc21f3f3032220"><td class="memItemLeft" align="right" valign="top">virtual aiReturn&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#a5ed0dddf418ab08cf3fc21f3f3032220">Seek</a> (size_t pOffset, aiOrigin pOrigin)=0</td></tr>
<tr class="memdesc:a5ed0dddf418ab08cf3fc21f3f3032220"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the read/write cursor of the file.  <a href="class_assimp_1_1_i_o_stream.html#a5ed0dddf418ab08cf3fc21f3f3032220"></a><br/></td></tr>
<tr class="memitem:a316ac6cd16b5a493d1313f792c806194"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#a316ac6cd16b5a493d1313f792c806194">Tell</a> () const =0</td></tr>
<tr class="memdesc:a316ac6cd16b5a493d1313f792c806194"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current position of the read/write cursor.  <a href="class_assimp_1_1_i_o_stream.html#a316ac6cd16b5a493d1313f792c806194"></a><br/></td></tr>
<tr class="memitem:ad0ca4aae1b8c4d00db391ac3a4171f7b"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#ad0ca4aae1b8c4d00db391ac3a4171f7b">Write</a> (const void *pvBuffer, size_t pSize, size_t pCount)=0</td></tr>
<tr class="memdesc:ad0ca4aae1b8c4d00db391ac3a4171f7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write to the file.  <a href="class_assimp_1_1_i_o_stream.html#ad0ca4aae1b8c4d00db391ac3a4171f7b"></a><br/></td></tr>
<tr class="memitem:a6cedc5033bf531bf14b97d1c9b788de8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#a6cedc5033bf531bf14b97d1c9b788de8">~IOStream</a> ()</td></tr>
<tr class="memdesc:a6cedc5033bf531bf14b97d1c9b788de8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="class_assimp_1_1_i_o_stream.html#a6cedc5033bf531bf14b97d1c9b788de8"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af5ae78123b6c6f7afc31b2a52dc9192e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_stream.html#af5ae78123b6c6f7afc31b2a52dc9192e">IOStream</a> (void)</td></tr>
<tr class="memdesc:af5ae78123b6c6f7afc31b2a52dc9192e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor protected, use <a class="el" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816" title="Open a new file with a given path.">IOSystem::Open()</a> to create an instance.  <a href="class_assimp_1_1_i_o_stream.html#af5ae78123b6c6f7afc31b2a52dc9192e"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>CPP-API: Class to handle file I/O for C++. </p>
<p>Derive an own implementation from this interface to provide custom IO handling to the <a class="el" href="class_assimp_1_1_importer.html" title="CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Libr...">Importer</a>. If you implement this interface, be sure to also provide an implementation for <a class="el" href="class_assimp_1_1_i_o_system.html" title="CPP-API: Interface to the file system.">IOSystem</a> that creates instances of your custom IO class. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af5ae78123b6c6f7afc31b2a52dc9192e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Assimp::IOStream::IOStream </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor protected, use <a class="el" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816" title="Open a new file with a given path.">IOSystem::Open()</a> to create an instance. </p>
<p>class <a class="el" href="class_assimp_1_1_i_o_stream.html" title="CPP-API: Class to handle file I/O for C++.">IOStream</a></p>

</div>
</div>
<a class="anchor" id="a6cedc5033bf531bf14b97d1c9b788de8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Assimp::IOStream::~IOStream </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Deleting the object closes the underlying file, alternatively you may use <a class="el" href="class_assimp_1_1_i_o_system.html#a8c334d60f04bceeb6bd0157d21723f3e" title="Closes the given file and releases all resources associated with it.">IOSystem::Close()</a> to release the file. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aaa01183d197fb714f28d6c611b6fa058"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t Assimp::IOStream::FileSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns filesize Returns the filesize. </p>

</div>
</div>
<a class="anchor" id="a7c19952446ece90924b246f087417899"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Assimp::IOStream::Flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Flush the contents of the file buffer (for writers) See fflush() for more details. </p>

</div>
</div>
<a class="anchor" id="ae376f641020989d61863b9c6f55c7abf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t Assimp::IOStream::Read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>pvBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read from the file. </p>
<p>See fread() for more details This fails for write-only files </p>

</div>
</div>
<a class="anchor" id="a5ed0dddf418ab08cf3fc21f3f3032220"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual aiReturn Assimp::IOStream::Seek </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">aiOrigin&#160;</td>
          <td class="paramname"><em>pOrigin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the read/write cursor of the file. </p>
<p>Note that the offset is <em>negative</em> for aiOrigin_END. See fseek() for more details </p>

</div>
</div>
<a class="anchor" id="a316ac6cd16b5a493d1313f792c806194"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t Assimp::IOStream::Tell </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current position of the read/write cursor. </p>
<p>See ftell() for more details </p>

</div>
</div>
<a class="anchor" id="ad0ca4aae1b8c4d00db391ac3a4171f7b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t Assimp::IOStream::Write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>pvBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write to the file. </p>
<p>See fwrite() for more details This fails for read-only files </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_o_stream_8hpp.html">IOStream.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 10 2012 17:55:53 for Assimp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
